package util.core;

import org.nutz.dao.Dao;
import org.nutz.dao.impl.NutDao;

import javax.sql.DataSource;


/**
 * 得到Nutz的Dao实例
 * <p/>
 * Created by WhiteBlue on 15/4/30.
 */
public class DbUtils {
    private static NutDao nutDao;

    public static Dao getNutzDao() {
        synchronized (nutDao) {
            if (nutDao == null)
                nutDao = new NutDao((DataSource) SpringFactory.getObject("dataSource"));
        }
        return nutDao;
    }


}
